New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue with failing NodeJS component after the container gets restarted #2265
Fix issue with failing NodeJS component after the container gets restarted #2265
Conversation
I tested this as well with service listing: ~/nodejs-ex master ✗ 358d ◒
▶ odo config set --env FOO=BAR
Environment variables were successfully updated.
Run `odo push --config` command to apply changes to the cluster.
~/nodejs-ex master ✗ 358d ◒
▶ odo push --config
Validation
✓ Checking component [21ms]
Configuration changes
✓ Retrieving component data [12ms]
✓ Applying configuration [12s]
Applying URL changes
✓ URL nodejs-nodejs-ex-gymi-8080 already exists
~/nodejs-ex master ✗ 358d ◒
▶ odo service create mongodb-persistent --plan default --wait -p DATABASE_SERVICE_NAME=mongodb -p MEMORY_LIMIT=512Mi -p MONGODB_DATABASE=sampledb -p VOLUME_CAPACITY=1Gi
✓ Creating service [88ms]
✓ Waiting for service to come up [37s]
✓ Service 'mongodb-persistent' is ready for use
~/nodejs-ex master ✗ 358d ◒
▶ odo url list
Found the following URLs for component nodejs-nodejs-ex-gymi in application app:
NAME STATE URL PORT
nodejs-nodejs-ex-gymi-8080 Pushed http://nodejs-nodejs-ex-gymi-8080-app-myproject.192.168.42.79.nip.io 8080
~/nodejs-ex master ✗ 358d ◒
▶ odo link mongodb-persistent
✓ Service mongodb-persistent has been successfully linked from the component nodejs-nodejs-ex-gymi
Following environment variables were added to nodejs-nodejs-ex-gymi component:
- admin_password
- database_name
- password
- uri
- username
~/nodejs-ex master ✗ 358d ◒
▶ ocget pods
~/nodejs-ex master ✗ 358d ◒ ⍉
▶ oc get pods
NAME READY STATUS RESTARTS AGE
mongodb-1-2h6mj 1/1 Running 0 5m
nodejs-nodejs-ex-gymi-app-3-xhfgl 1/1 Running 0 18s
~/nodejs-ex master ✗ 358d ◒
▶ Works and the application comes up after restarting. |
I'm seeing an issue that I didn't see in a previous version. git clone https://github.com/openshift-evangelists/Wild-West-Backend gives this error: ✗ Rel: can't make target/wildwest-1.0.jar relative to /Users/jkleiner/Downloads/Wild-West-Backend I did not get that error in odo v1.0.0-beta6 (0cdcc90) |
@jankleinert just to test this PR can you try |
@girishramnani with that workaround, it did work for me |
/retest
|
b1d5140
to
936aaec
Compare
I thought that I saw this error somewhere. Now I remembered that I've opened PR to fix this last week. - #2211 It is just waiting to be merged |
936aaec
to
2c1f2e0
Compare
There is one big problem with this and that is that re-introduces #2171 |
It looks like that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Works for me as mentioned in the steps to test. Code LGTM.
/hold so that this doesn't go in before image name is changed after redhat-developer/odo-init-image#40 goes in.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dharmit The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from me as well @dharmit
/lgtm
2c1f2e0
to
f8463c7
Compare
/retest
|
/hold cancel |
/retest Please review the full test history for this PR and help us cut down flakes. |
What is the purpose of this change? What does it change?
This fixes the issue where the source code for nodejs was lost after the container was restarted.
This was due to the fact that we removed steps that were coping source files from the /tmp/src directory to /opt/app-root/src.
This updates just the image used by odo, the actual fix is in odo-init-image - redhat-developer/odo-init-image#40
After this is tested. We will release a new odo-init-image, and update this PR to use the released version.
Was the change discussed in an issue?
fixes #2224
How to test changes?
You can download odo binaries build from this PR at https://gcsweb-ci.svc.ci.openshift.org/gcs/origin-ci-test/pr-logs/pull/openshift_odo/2265/pull-ci-openshift-odo-master-v4.1-unit/407/artifacts/unit/dist/bin/
or
TODO: